package day6;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class CaclTtotal {
    public static void main(String[] args) {
        //三个班，5个同学的总成绩
        double [][]d=new double[3][5];
        Scanner in=new Scanner(System.in);
        for(int i=0;i<d.length;i++){
            System.out.println("请输入"+(i+1)+"班5名同学的成绩:");
            for(int j=0;j<d[i].length;j++){
                d[i][j]=in.nextDouble();
            }
        }
        double sum=0;
        for(int i=0;i<d.length;i++){
            sum=0;
            for(int j=0;j<d[i].length;j++){
                sum+=d[i][j];
            }
            System.out.println((i+1)+"班同学的总分是："+sum);
        }
    }
}
